<template>
  <div>
    <ul>
      <li v-for="route in routers" :key="route.path">
        {{route.name}}
        <navbar :item="route"></navbar>
      </li>
    </ul>
    <router-view></router-view>
  </div>
</template>

<script>
import Navbar from "./navbar";
export default {
  name: 'layout',
  components: {Navbar},
  data () {
    return {
    }
  },
  computed: {
    routers () {
      console.log('router:')
      console.log(this.$router)
      return this.$router.options.routes
    }
  }
}
</script>

<style scoped>

</style>
